#include <iostream>
#include <cstring>
using namespace std;

int main()
{
	int x,y,z ;
	cin >> x >> y >> z;;
	int chong[51] ;
	int chong_w[51];
	int luan[52];
	 
	memset(chong,0,sizeof(chong));
	memset(luan,0,sizeof(luan));
	//memset(chong_w,0,sizeof(chong_w));

	chong[1] = 1;
	for (int i=2;i<=z+1;i++)
	{		
		chong[i] = chong[i-1] + luan[i-2];
		luan[i] = chong[i-x]*y + luan[i-1] - luan[i-2];	
		//chong[i] = chong[i-1] + chong[i-2-x]*y;			
	}
	printf("%d\n",chong[z+1]);
	/*
	for (int j=1;j<=z;j++)
	{
			cout << "chong:" << chong[j] << endl;
			cout << "luan:" << luan[j] << endl;
	}
	*/
	return 0;
 } 
